package com.aynu.admin.mapper.base;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface StatisticsMapper {
    @Select("""
            select role,COUNT(*) as amount
            from t_account
            group by  role;
            """)
    List<Map<Integer, Long> > roleStatistics();
    @Select("""
            select status ,COUNT(*) as amount
            from t_order
            group by status;
            """)
    List<Map<Integer,Long > > orderStatistics();
    @Select("""
            select COUNT(*) as amount
            from t_stroke;
            """)
    Map<String,Long> strokeStatistics();
}
